当前位置:flash课件吧→FLASH课件制作,FLASH课件制作教程3,FLASH课件,FLASH课件教程,免费教程,免费FLASH课件制作教程,免费课件制作教程( 新改版 新气象

 

如何应用flash制作一个可以自动变换的图版或者像册

// Action script... // [onClipEvent of sprite 1 in frame 1] onClipEvent (load) { this._alpha = 0; } // [onClipEvent of sprite 2 in frame 1] onClipEvent (load) { this._alpha = 0; } // [onClipEvent of sprite 3 in frame 1] onClipEvent (load) { this._alpha = 0; } // [onClipEvent of sprite 4 in frame 1] onClipEvent (load) { this._alpha = 0; } // [onClipEvent of sprite 5 in frame 1] onClipEvent (load) { this._alpha = 0; } // [onClipEvent of sprite 6 in frame 1] onClipEvent (load) { this._alpha = 0; } // [onClipEvent of sprite 8 in frame 1] onClipEvent (load) { this._visible = true; } // [Action in Frame 1] function fadeTPl_1(co, no) { currPicObj = co; nextPicObj = no; fadingLoop = setInterval(function () { if (nextPicObj._alpha > = 100 && currentPic._alpha <= 0) { clearInterval(fadingLoop); currentPic = nextPic; isFading = false; return(undefined); } // end if currPicObj._alpha = currPicObj._alpha - 10; nextPicObj._alpha = nextPicObj._alpha + 10; }, 50); } // End of the function function getData() { var xmlObj = new XML(); var _l1 = "http://www.xunlei.com/fade.xmlcacheTime= " + new Date(); xmlObj.load(_l1); xmlObj.ignoreWhite = true; xmlObj.onLoad = function (success) { fixData(xmlObj); }; } // End of the function function fixData(o) { var i = 0; while (i < o.firstChild.childNodes.length) { arrImg.push(o.firstChild.childNodes[i].childNodes[2].firstChild); arrUrl.push(o.firstChild.childNodes[i].childNodes[1].firstChild); arrTitle.push(o.firstChild.childNodes[i].childNodes[0].firstChild); i++; } // end while img1_mc.loadMovie(arrImg[0]); img2_mc.loadMovie(arrImg[1]); linkbutton.onRelease = function () { getURL(htmlReplace(arrUrl[0]), "_blank "); flash.external.ExternalInterface.call( "fls_onClick ", "0 "); }; btn1_mc.gotoAndStop(2); } // End of the function function preLoadPic(i) { if (i == 7) { i = 0; } // end if if (isLoading[i]) { return(undefined); } // end if i++; eval( "img " + i + "_mc ").loadMovie(arrImg[i - 1]); isLoading[i - 1] = true; } // End of the function function checkPicLoad(i, o) { o.onEnterFrame = function () { if (int(o.getBytesLoaded() / o.getBytesTotal() * 100) > = 100) { eval( "btn " + i + "_mc ")._visible = true; delete o[ "onEnterFrame "]; } // end if }; } // End of the function function start() { getData(); } // End of the function function checkFade() { var i = 1; while (i < 8) { if (eval( "btn " + i + "_mc ")._visible == false) { return(undefined); } // end if i++; } // end while clearInterval(picLoadLoop); startFade(); } // End of the function function startFade() { playerPlay(); } // End of the function function picFade() { nextPic = currentPic == 7 (1) : (parseInt(currentPic) + 1); loadFadeTpl(eval( "img " + currentPic + "_mc "), eval( "img " + nextPic + "_mc ")); } // End of the function function loadFadeTpl(co, no) { preLoadPic(nextPic); isFading = true; linkbutton.onRelease = function () { getURL(htmlReplace(arrUrl[nextPic - 1]), "_blank "); flash.external.ExternalInterface.call( "fls_onClick ", nextPic - 1); }; setButtonColor(); fadeTPl_1(co, no); } // End of the function function setButtonColor() { var i = 1; while (i < 8) { eval( "btn " + i + "_mc ").gotoAndStop(1); i++; } // end while eval( "btn " + nextPic + "_mc ").gotoAndStop(2); } // End of the function function setCurrPic(cp) //这是切换图片的主函数 { if (currentPic == cp) { return(undefined); } // end if if (!isLoading[cp - 1]) { eval( "img " + cp + "_mc ").loadMovie(arrImg[cp - 1]); isLoading[cp - 1] = true; } // end if if (isFading == false) { playerStop(); nextPic = cp; loadFadeTpl(eval( "img " + currentPic + "_mc "), eval( "img " + nextPic + "_mc ")); } else { trace(isFading); } // end if } // End of the function function playPrePic() { playerStop(); nextPic = currentPic == 1 (7) : (parseInt(currentPic) - 1); if (!isLoading[nextPic - 1]) { eval( "img " + nextPic + "_mc ").loadMovie(arrImg[nextPic - 1]); isLoading[nextPic - 1] = true; } // end if loadFadeTpl(eval( "img " + currentPic + "_mc "), eval( "img " + nextPic + "_mc ")); } // End of the function function playNextPic() { playerStop(); picFade(); } // End of the function function playerStop() { _root.player_mc.gotoAndStop(1); clearInterval(fadeLoop); } // End of the function function playerPlay() { _root.player_mc.gotoAndStop(2); fadeLoop = setInterval(picFade, 4000); } // End of the function function htmlReplace(str) { var _l1 = str.toString(); if (_l1.indexOf( "&amp; ") != -1) { _l1 = _l1.split( "&amp; "); return(_l1.join( "& ")); } // end if return(_l1); } // End of the function stop(); Stage.scaleMode = "noScale "; Stage.showMenu = false; System.useCodepage = false; var picLoadLoop; var fadeLoop; var currentPic = 1; var nextPic; var arrUrl = []; var arrTitle = []; var arrImg = []; var isFading = false; var isLoading = [true, true, false, false, false, false, false]; var fadingLoop; var currPicObj; var nextPicObj; picLoadLoop = setInterval(checkFade, 500); start(); 这是译出来的的原始as 这类广告切换条一般都是使用函数来调用切换的

 

 

 

期刊论文服务

合作期刊
学报期刊
 
获奖证书办理
本站已改版成新站 课件115学培吧http://www.kj115.com
FLASH课件制作教程3 相关内容导航
给你的Flash课件加上一支注释笔 flash课件中如何制作定时返回 Flash课件制作与研究 Flash课件制作的要点
Flash课件组装技法 我是如何快速学会Flash课件制作的 让你的课件锦上添花 用Flash制作课件片头 用FLASH制作课件的优势和缺陷
Flash课件入门必看 用Flash MX制作Windows弹出窗口 浅谈如何将实时三维运算引入FLASH物理课件制作 flash课件制作教程
选择题课件制作一例 Flash制作课件的特点 Flash课件制作实例:植物细胞的有丝分裂 Flash课件的制作论文
flash制作测验题模板课件 Flash实例教程 小孔成像课件 课件制作 初中历史课件《秦王扫六合》实例 怎样用FLASH制作课件?
Flash MX制作简单的课件界面 Flash课件制作 Flash地理动画课件制作实例—水循环 用Flash制作交互课件:相关脚本元素
(课件制作)FLASH制作练习题 地理课件制作中的地图处理 FLASH制作课件实例视频教程技巧(39个技巧) 如何用Flash制作课件片头
用Flash制作课件片头 Flash课件实例 画正多边形 (课件制作)FLASH制作练习题(鼠标拖动实例的制作) 实现在Flash课件中显示系统时间和上课时间
Flash课件一网打尽 Flash课件制作的学习方法 (课件制作)FLASH制作练习题(连线题的制作) 把按钮藏起来 谈制作Flash课件时的隐形处理
课件中如何调入Flash动画 Flash课件轻松搞定单选题制作 (课件制作)FLASH制作练习题(填空题的制作) 更多内容总目录(105个)》》》
国家信息产业部备案专号:鄂ICP08005724返回顶部
本站推荐最佳分辨率:1024X768在线咨询台
声明:我站除课件制作动画制作培训以外,所有内容均属于免费资源。本站部分资源来自于网络,由本站收集整理,如有侵权请联系本站管理(QQ444860709 手机13339817386),我站会在三个工作日内处理。